﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Maydew.Windows.Forms.Controls.FlexiCell
{
    /// <summary>
    /// 为 RowIndexChanged 事件提供服务。
    /// </summary>
    /// <param name="sender">事件对象。</param>
    /// <param name="e">事件参数。</param>
    public delegate void RowIndexChangedEventHander(object sender, RowIndexChangedEventArgs e);
    /// <summary>
    /// 为 RowIndexChanged 事件提供参数服务。
    /// </summary>
    public class RowIndexChangedEventArgs : EventArgs
    {
        #region " 私有变量 "
        /// <summary>
        /// 获取行号。
        /// </summary>
        private int _rowIndex;
        /// <summary>
        /// 获取新行号。
        /// </summary>
        private int _newRowIndex;
        #endregion

        #region " 构造函数 "
        /// <summary>
        /// 初始化 RowIndexChangedEventArgs 类的新实例。
        /// </summary>
        /// <param name="rowIndex">行号。</param>
        /// <param name="newRowIndex">新行号。</param>
        public RowIndexChangedEventArgs(int rowIndex, int newRowIndex)
        {
            _rowIndex = rowIndex;
            _newRowIndex = newRowIndex;
        }
        #endregion

        #region " 属性 "
        /// <summary>
        /// 获取行号。
        /// </summary>
        public int RowIndex { get { return _rowIndex; } }
        /// <summary>
        /// 获取新行号。
        /// </summary>
        public int NewRowIndex { get { return _newRowIndex; } }
        #endregion
    }
    /// <summary>
    /// 为 ColumnNameChanged 事件提供服务。
    /// </summary>
    /// <param name="sender">事件对象。</param>
    /// <param name="e">事件参数。</param>
    public delegate void ColumnNameChangedEventHandler(object sender,ColumnNameChangedEventArgs e);
    /// <summary>
    /// 为 ColumnNameChanged 事件提供参数服务。
    /// </summary>
    public class ColumnNameChangedEventArgs : EventArgs
    {
        #region " 私有变量 "
        /// <summary>
        /// 获取列名。
        /// </summary>
        private string _columnName;
        /// <summary>
        /// 获取新列名。
        /// </summary>
        private string _newColumnName;
        #endregion

        #region " 构造函数 "
        /// <summary>
        /// 初始化 ColumnNameChangedEventArgs 类的新实例。
        /// </summary>
        /// <param name="columnName"></param>
        /// <param name="newColumnName"></param>
        public ColumnNameChangedEventArgs(string columnName,string newColumnName)
        {
            _columnName = columnName;
            _newColumnName = newColumnName;
        }
        #endregion

        #region " 属性 "
        /// <summary>
        /// 获取列名。
        /// </summary>
        public string ColumnName { get { return _columnName; } }
        /// <summary>
        /// 获取新列名。
        /// </summary>
        public string NewColumnName { get { return _newColumnName; } }
        #endregion
    }
}

